Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shortcut for changing the TG in parameter edit #70

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Add shortcut for changing the TG in parameter edit #70

merged 1 commit into from
Apr 5, 2022

Conversation

rsta2
Copy link
Contributor

@rsta2 rsta2 commented Apr 4, 2022

When a parameter is edited in the UI, the current TG can be changed
by pressing the switch and turning the knob left or right. The
selected TG remains active, when the parameter editor is left. The
menu home position is entered by triple click now, reboot after
holding the switch for ten seconds.

When a parameter is edited in the UI, the current TG can be changed
by pressing the switch and turning the knob left or right. The
selected TG remains active, when the parameter editor is left. The
menu home position is entered by triple click now, reboot after
holding the switch for ten seconds.
@rsta2 rsta2 mentioned this pull request Apr 4, 2022
@probonopd
Copy link
Owner

Thanks @rsta2, testing it now.

The menu home position is entered by triple click now

Why did you change this? I think a triple click is much harder to do thatn a long press. Technical reasons or personal preference?

@rsta2
Copy link
Contributor Author

rsta2 commented Apr 5, 2022

Because pressing the switch while turning the knob would trigger the "Home" function too. It cannot technically be decided, if the longer press is for the shortcut or the Home function.

@probonopd
Copy link
Owner

Logic-wise it could be done like this:
For the rotary controller button, Never act directly on "key down" events. Wait for the "key up" event. If the knob was rotated in between "key down" and "key up", then it was not a long-press but a press-and-rotate operation. (Not sure whether this can be translated into code easily.)

@rsta2
Copy link
Contributor Author

rsta2 commented Apr 5, 2022

It does not act directly on switch down events, but acts, when the switch is down and the knob is turned. Otherwise you wouldn't see an direct reaction. You would have to turn the knob "in the blind", which does not work, because the reaction is not as direct. You cannot count say 2 turns, and will move the TG number by 2 further.

@probonopd
Copy link
Owner

It does not act directly on switch down events, but acts, when the switch is down and the knob is turned. Otherwise you wouldn't see an direct reaction.

Sure. But in that case we also know that it was not a "long press".
Maybe I misunderstand the problem.

Why is it possible to detect a 10 second long press (for rebooting) but not a shorter one (for going to the home screen)?

In any case, merging, since it is an improvement.

@probonopd probonopd merged commit 9c5dea7 into probonopd:main Apr 5, 2022
@rsta2 rsta2 deleted the ui-change-tg-shortcut branch April 5, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants